package com.chee.plant.hibernate.object.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the user_heroplant table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="user_heroplant"
 */

public abstract class BaseUserHeroplant  implements Serializable {

	public static String REF = "UserHeroplant";
	public static String PROP_NAME = "Name";
	public static String PROP_EXP = "Exp";
	public static String PROP_REVIVE_TIME = "ReviveTime";
	public static String PROP_DEFENSE = "Defense";
	public static String PROP_ATTACK = "Attack";
	public static String PROP_FRIEND_ID = "FriendId";
	public static String PROP_ID = "Id";
	public static String PROP_LEVEL = "Level";
	public static String PROP_LIFE = "Life";
	public static String PROP_USER_ID = "UserId";
	public static String PROP_DESC = "Desc";


	// constructors
	public BaseUserHeroplant () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseUserHeroplant (java.lang.Integer id) {
		this.setId(id);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseUserHeroplant (
		java.lang.Integer id,
		java.lang.Integer userId,
		java.lang.Integer friendId,
		java.lang.String name,
		java.lang.String desc,
		java.lang.Integer attack,
		java.lang.Integer defense,
		java.lang.Integer life,
		java.lang.Integer level,
		java.lang.Integer exp,
		java.lang.Integer reviveTime) {

		this.setId(id);
		this.setUserId(userId);
		this.setFriendId(friendId);
		this.setName(name);
		this.setDesc(desc);
		this.setAttack(attack);
		this.setDefense(defense);
		this.setLife(life);
		this.setLevel(level);
		this.setExp(exp);
		this.setReviveTime(reviveTime);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer id;

	// fields
	private java.lang.Integer userId;
	private java.lang.Integer friendId;
	private java.lang.String name;
	private java.lang.String desc;
	private java.lang.Integer attack;
	private java.lang.Integer defense;
	private java.lang.Integer life;
	private java.lang.Integer level;
	private java.lang.Integer exp;
	private java.lang.Integer reviveTime;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="sequence"
     *  column="id"
     */
	public java.lang.Integer getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.Integer id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: user_id
	 */
	public java.lang.Integer getUserId () {
		return userId;
	}

	/**
	 * Set the value related to the column: user_id
	 * @param userId the user_id value
	 */
	public void setUserId (java.lang.Integer userId) {
		this.userId = userId;
	}



	/**
	 * Return the value associated with the column: friend_id
	 */
	public java.lang.Integer getFriendId () {
		return friendId;
	}

	/**
	 * Set the value related to the column: friend_id
	 * @param friendId the friend_id value
	 */
	public void setFriendId (java.lang.Integer friendId) {
		this.friendId = friendId;
	}



	/**
	 * Return the value associated with the column: name
	 */
	public java.lang.String getName () {
		return name;
	}

	/**
	 * Set the value related to the column: name
	 * @param name the name value
	 */
	public void setName (java.lang.String name) {
		this.name = name;
	}



	/**
	 * Return the value associated with the column: desc
	 */
	public java.lang.String getDesc () {
		return desc;
	}

	/**
	 * Set the value related to the column: desc
	 * @param desc the desc value
	 */
	public void setDesc (java.lang.String desc) {
		this.desc = desc;
	}



	/**
	 * Return the value associated with the column: attack
	 */
	public java.lang.Integer getAttack () {
		return attack;
	}

	/**
	 * Set the value related to the column: attack
	 * @param attack the attack value
	 */
	public void setAttack (java.lang.Integer attack) {
		this.attack = attack;
	}



	/**
	 * Return the value associated with the column: defense
	 */
	public java.lang.Integer getDefense () {
		return defense;
	}

	/**
	 * Set the value related to the column: defense
	 * @param defense the defense value
	 */
	public void setDefense (java.lang.Integer defense) {
		this.defense = defense;
	}



	/**
	 * Return the value associated with the column: life
	 */
	public java.lang.Integer getLife () {
		return life;
	}

	/**
	 * Set the value related to the column: life
	 * @param life the life value
	 */
	public void setLife (java.lang.Integer life) {
		this.life = life;
	}



	/**
	 * Return the value associated with the column: level
	 */
	public java.lang.Integer getLevel () {
		return level;
	}

	/**
	 * Set the value related to the column: level
	 * @param level the level value
	 */
	public void setLevel (java.lang.Integer level) {
		this.level = level;
	}



	/**
	 * Return the value associated with the column: exp
	 */
	public java.lang.Integer getExp () {
		return exp;
	}

	/**
	 * Set the value related to the column: exp
	 * @param exp the exp value
	 */
	public void setExp (java.lang.Integer exp) {
		this.exp = exp;
	}



	/**
	 * Return the value associated with the column: revive_time
	 */
	public java.lang.Integer getReviveTime () {
		return reviveTime;
	}

	/**
	 * Set the value related to the column: revive_time
	 * @param reviveTime the revive_time value
	 */
	public void setReviveTime (java.lang.Integer reviveTime) {
		this.reviveTime = reviveTime;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.chee.plant.hibernate.object.UserHeroplant)) return false;
		else {
			com.chee.plant.hibernate.object.UserHeroplant userHeroplant = (com.chee.plant.hibernate.object.UserHeroplant) obj;
			if (null == this.getId() || null == userHeroplant.getId()) return false;
			else return (this.getId().equals(userHeroplant.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}

private static final long serialVersionUID = 1L; 
}